﻿using System;
using System.Collections.Generic;
using System.Text;

namespace StatusPattern
{
    /// <summary>
    /// 断电
    /// </summary>
    public class CutoutElectric: BaseElectric
    {


        public CutoutElectric()
        {
            base.ElectricStatus = ElectricType.close;
        }

        public override void Turn(Context context)
        {
            context.CurrentElectric =new Electrified() ;
        }

        public override void Run()
        {
            Console.WriteLine($"开关的状态是{base.ElectricStatus},电车停止运行");
        }
    }
}
